package com.zzh.controller;

import com.zzh.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;


/*
 * @Auther : wenrouyue
 * @Date : 2022/2/27-14:14
 */
@Controller
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("/user")
    public String user(Model model, Integer id){
        model.addAttribute("user",userService.queryUserById(id));
        return "user";
    }
}
